-
-
Notifications
You must be signed in to change notification settings - Fork 459
Add support for reading distribution options from properties #4784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
runningcode
merged 4 commits into
main
from
no/eme-397-set-sentryoptionsdistributionoptions-from-gradle-or
Oct 8, 2025
Merged
Add support for reading distribution options from properties #4784
runningcode
merged 4 commits into
main
from
no/eme-397-set-sentryoptionsdistributionoptions-from-gradle-or
Oct 8, 2025
+217
−0
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
d217708 | 409.83 ms | 474.72 ms | 64.89 ms |
604a261 | 380.65 ms | 451.27 ms | 70.62 ms |
b3d8889 | 420.46 ms | 453.71 ms | 33.26 ms |
c8125f3 | 383.82 ms | 441.66 ms | 57.84 ms |
ee747ae | 396.82 ms | 441.67 ms | 44.86 ms |
3d205d0 | 352.15 ms | 432.53 ms | 80.38 ms |
ce0a49e | 532.00 ms | 609.96 ms | 77.96 ms |
17a0955 | 372.53 ms | 446.70 ms | 74.17 ms |
b3d8889 | 371.69 ms | 432.96 ms | 61.26 ms |
d217708 | 411.22 ms | 430.86 ms | 19.63 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
d217708 | 1.58 MiB | 2.10 MiB | 532.97 KiB |
604a261 | 1.58 MiB | 2.10 MiB | 533.42 KiB |
b3d8889 | 1.58 MiB | 2.10 MiB | 535.07 KiB |
c8125f3 | 1.58 MiB | 2.10 MiB | 532.32 KiB |
ee747ae | 1.58 MiB | 2.10 MiB | 530.95 KiB |
3d205d0 | 1.58 MiB | 2.10 MiB | 532.97 KiB |
ce0a49e | 1.58 MiB | 2.10 MiB | 532.94 KiB |
17a0955 | 1.58 MiB | 2.10 MiB | 533.20 KiB |
b3d8889 | 1.58 MiB | 2.10 MiB | 535.06 KiB |
d217708 | 1.58 MiB | 2.10 MiB | 532.97 KiB |
Previous results on branch: no/eme-397-set-sentryoptionsdistributionoptions-from-gradle-or
Startup times
Revision | Plain | With Sentry | Diff |
---|---|---|---|
d80d827 | 373.06 ms | 445.63 ms | 72.57 ms |
ab836f2 | 341.81 ms | 405.30 ms | 63.49 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
d80d827 | 1.58 MiB | 2.11 MiB | 539.35 KiB |
ab836f2 | 1.58 MiB | 2.11 MiB | 539.35 KiB |
37e6a46
to
47bad3a
Compare
romtsn
reviewed
Oct 7, 2025
sentry/src/main/java/io/sentry/util/DebugMetaPropertiesApplier.java
Outdated
Show resolved
Hide resolved
romtsn
approved these changes
Oct 7, 2025
chromy
reviewed
Oct 7, 2025
sentry/src/test/java/io/sentry/util/DebugMetaPropertiesApplierTest.kt
Outdated
Show resolved
Hide resolved
…roperties Extends DebugMetaPropertiesApplier to read and apply distribution configuration from properties files. This allows the Gradle plugin to populate distribution options (orgSlug, projectSlug, orgAuthToken, buildConfiguration) that will be automatically loaded when the SDK initializes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Include buildConfiguration in initial property check to fix bug where buildConfiguration-only properties would be skipped - Add isEmpty() checks for all property values before applying - Add comment explaining break statement (only process first properties file) - Add test for buildConfiguration-only scenario - Add test for empty string values 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Rename property from `io.sentry.distribution.org-auth-token` to `io.sentry.distribution.auth-token` to match sentry-android-gradle-plugin - Rename method from `getDistributionOrgAuthToken` to `getDistributionAuthToken` - Improve test to verify first properties file with distribution options is used 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
5cb66e4
to
f6701a6
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Extends
DebugMetaPropertiesApplier
to read and apply distribution configuration from properties files bundled in the APK. This is part of EME-397 to allow the Sentry Android Gradle Plugin to automatically populateSentryOptions.DistributionOptions
fields.Integration
This allows the Gradle plugin (implemented here) to generate these properties at build time and bundle them into the APK. The SDK will automatically load them when initializing, making distribution configuration seamless for developers.
There are probably many ways of passing these options to the client but using properties files doesn't require the client to recompile resources or code and there is already an existing mechanism in the codebase to do this so I just piggy-backed on that mechanism.
Notes
#skip-changelog This feature is not released or published yet.
🤖 Generated with Claude Code